﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<KnitwearCompany.Models.Category>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Категории
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <table width='900px'>
        <tr>
            <th>
                id
            </th>
            <th>
                Название
            </th>
            <th></th>
        </tr>
    <% foreach (var item in Model) { %>
        <tr>
            <td>
                <%= Html.Encode(item.Id) %>
            </td>
            <td>
                <%= Html.Encode(item.Name) %>
            </td>
            <td>
                <%= Html.ActionLink("Изменить", "EditCategory", new { ID = item.Id }) %> |
                <%= Html.ActionLink("Удалить", "DeleteCategory", new { ID = item.Id })%>
            </td>
        </tr>
    <% } %>
    </table>
    <p>
        <%= Html.ActionLink("+ Добавить", "CreateCategory") %>
    </p>

    <br/><br/>
    <%: Html.ActionLink("Назад", "Admin", "Admin") %>
</asp:Content>
